<!doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>同业合作渠道</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>

    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <link rel="stylesheet" href="./css/style.css">
</head>

<body>
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">渠道管理</a>
        <a>
          <cite>同业合作渠道</cite></a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>

<div class="x-body">
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so">
            <input type="text" name="username"  placeholder="输入合作机构或联系人查询" autocomplete="off" class="layui-input">
            <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </form>

    </div>
    <xblock>
        <button class="layui-btn" onclick="x_admin_show('新增同业合作渠道','./peer-add.html',600,400)"><i class="layui-icon"></i>新增渠道</button>
        <span class="x-right" style="line-height:40px">共有数据：88 条</span>
    </xblock>


    <table class="layui-table">
        <thead>
        <tr>

            <th>合作机构</th>
            <th>联系人</th>
            <th>职位</th>
            <th>累计资源</th>
            <th>有效资源</th>
            <th>最近推送资源时间</th>
            <th>负责人</th>
            <th >操作</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td class="ee">乐中达</td>
            <td>陈冠希</td>
            <td>主管</td>
            <td>100</td>
            <td>50</td>
            <td>2017-9-18</td>
            <td>张三</td>
            <td class="td-manage">
                <a title="修改"  onclick="x_admin_show('修改渠道信息','peer-add.html',600,400)" href="javascript:;">
                    <i class="layui-icon">&#xe642;</i>
                </a>
                <a title="删除" onclick="member_del(this,'要删除的id')" href="javascript:;">
                    <i class="layui-icon">&#xe640;</i>
                </a>
            </td>
        </tr>
        <tr>
            <td class="ee">乐中达</td>
            <td>陈冠希</td>
            <td>主管</td>
            <td>100</td>
            <td>50</td>
            <td>2017-9-18</td>
            <td>张三</td>
            <td class="td-manage">
                <a title="修改"  onclick="x_admin_show('修改渠道信息','peer-add.html',600,400)" href="javascript:;">
                    <i class="layui-icon">&#xe642;</i>
                </a>
                <a title="删除" onclick="member_del(this,'要删除的id')" href="javascript:;">
                    <i class="layui-icon">&#xe640;</i>
                </a>
            </td>
        </tr>
        </tbody>
    </table>
    <div class="page">
        <div>
            <a class="prev" href="">&lt;&lt;</a>
            <a class="num" href="">1</a>
            <span class="current">2</span>
            <a class="num" href="">3</a>
            <a class="num" href="">99</a>
            <a class="next" href="">&gt;&gt;</a>
        </div>
    </div>
</div>

<script type="text/javascript" src="./js/jquery-3.2.1.min.js"></script>
<script src="./lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="./js/xadmin.js"></script>
<script>
    $(".sl").click(function () {
        var input = "<input type='text' id='temp' class=\"layui-input\"  placeholder=\"请输入\" value=" + $(this).text() + " >";
        $(this).text("");
        $(this).append(input);
        $("input#temp").focus();
        $("input").blur(function () {
            if ($(this).val() == ""||$("this").val()=="请输入") {
                $(this).remove();
                $("sl").text("请输入");
//              $("this").closest("td").text("请输入")
            } else {
                $(this).closest("td").text($(this).val());
            }
        });
    })

</script>
<script>

    function member_del(obj,id){
        var data=$(obj).parent().parent().children().html();
        console.log(data)
        layer.confirm('确认要删除'+data+'吗？',{title:'确认删除'},function(index){
            //发异步删除数据
            $(obj).parents("tr").remove();
            layer.msg('已删除!',{icon:1,time:1000});
        });
    }
</script>
<script>var _hmt = _hmt || [];
(function () {
    var hm = document.createElement("script");
    hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(hm, s);
})();</script>
</body>

</html>